<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="退货申请" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="addApply()"
                            ng-disabled="!btnPermission.returnApplyAdd" title="{{!btnPermission.returnApplyAdd?'无权限执行此操作':''}}">新增</button>
                    <button class="btn btn-operate m-r-sm" ng-click="manulAddApply()"
                            ng-disabled="!btnPermission.returnApplyManulAdd" title="{{!btnPermission.returnApplyManulAdd?'无权限执行此操作':''}}">手动新增</button>
                    <button class="btn btn-operate" ng-click="delData('batch')"
                            ng-disabled="!btnPermission.returnApplyDel" title="{{!btnPermission.returnApplyDel?'无权限执行此操作':''}}">删除</button>
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                        <div class="btn btn-default base-color" ng-if="!!btnPermission.returnApplyExport">
                            <div title="导出">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                            <ul class="more-tool">
                                <li yb-download download-url="exportParam.sectionUrl" download-param="exportParam.sectionParam"
                                    download-key="returnInIds">
                                    <i class="yb-icon ico-export-o"></i> 导出
                                </li>
                                <li yb-download download-url="exportParam.allUrl" download-param="condition" download-duration="3">
                                    <i class="yb-icon ico-export-o"></i> 导出全部
                                </li>
                            </ul>
                        </div>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="退货申请单号"
                               ng-model="condition.applyNo">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">退货申请单号：</label>
                        <input type="text" class="form-control" ng-model="condition.applyNo">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">采购公司：</label>
                        <input type="text" class="form-control" ng-model="condition.purchaseOrgName">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">审核状态：</label>
                        <select class="form-control" ng-model="condition.status"
                                ng-options="item.id as item.name for item in stateList">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">退货申请状态：</label>
                        <select class="form-control" ng-model="condition.isReturn"
                                ng-options="item.id as item.name for item in returnState">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">退货入库状态：</label>
                        <select class="form-control" ng-model="condition.isIn"
                                ng-options="item.id as item.name for item in inState">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">CRM单号：</label>
                        <input type="text" name="agentName" class="form-control" ng-model="condition.crmOrder">
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label">申请时间：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.createDateStart"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(0)" is-open="datePickerFlag[0]" close-text="关闭"
                               ng-change="checkDate(condition, 'createDateStart', 'createDateEnd')" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.createDateEnd"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(1)" is-open="datePickerFlag[1]" close-text="关闭"
                               ng-change="checkDate(condition, 'createDateStart', 'createDateEnd')" modal-size="small" readonly>
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tbConf" col-fixed="true"
                 has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <thead>
                            <tr>
                                <th width="40" class="text-center th-check border-l-none">
                                    <div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectAll()"></div>
                                </th>
                                <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tbConf.tableCol, $index)"
                                    ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tbConf.fixedWidth" fixed-width="tbStyle.billFixedWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tbConf.tableCol, $index)" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tbConf.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.curRow}" ng-click="selectRow($index)">
                                <td width="40" class="text-center border-l-none">
                                    <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item)"></div>
                                </td>
                                <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                    <div class="font-0" ng-if="itemCol.type === 'operate'">
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="printBill(item)"
                                                ng-disabled="!btnPermission.returnApplyPrint" title="{{!btnPermission.returnApplyPrint?'无权限执行此操作':''}}">打印</button>
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="auditApply(item)"
                                                ng-disabled="(item.status !== 0 && item.status !== 2) || !btnPermission.returnApplyAudit" title="{{!btnPermission.returnApplyAudit?'无权限执行此操作':''}}">审核</button>
                                        <button type="button" class="btn btn-operate m-r-xs" ng-disabled="item.status == 2 || item.status == 4" ng-click="editApply(item)">编辑</button>
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="delData('single', item.id)"
                                                ng-disabled="item.status === 4 || !btnPermission.returnApplyDel" title="{{!btnPermission.returnApplyDel?'无权限执行此操作':''}}">删除</button>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.curRow}"
                                ng-click="selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                    <div class="font-0" ng-if="itemCol.type === 'operate'">
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="printBill(item)"
                                                ng-disabled="!btnPermission.returnApplyPrint" title="{{!btnPermission.returnApplyPrint?'无权限执行此操作':''}}">打印</button>
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="auditApply(item)"
                                                ng-disabled="(item.status !== 0 && item.status !== 2) || !btnPermission.returnApplyAudit" title="{{!btnPermission.returnApplyAudit?'无权限执行此操作':''}}">审核</button>
                                        <button type="button" class="btn btn-operate m-r-xs" ng-disabled="item.status == 2 || item.status == 4" ng-click="editApply(item)">编辑</button>
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="delData('single', item.id)"
                                                ng-disabled="item.status === 4 || !btnPermission.returnApplyDel" title="{{!btnPermission.returnApplyDel?'无权限执行此操作':''}}">删除</button>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allChecked" yb-check-name="全选"
                     yb-click="selectAll()"></div>
                <button class="btn btn-operate" ng-click="delData('batch')"
                        ng-disabled="!btnPermission.returnApplyDel" title="{{!btnPermission.returnApplyDel?'无权限执行此操作':''}}">删除</button>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="{{tabFlag.name}}" active="activeFlag[1]" ng-if="activeFlag[1]">
            <div yb-step-bar class="m-t m-b-sm" ng-model="steps" style="width: 60%"></div>
            <div ng-show="steps.curStep === 0">
                <div class="row p-t-sm p-b-sm border-t">
                    <div class="search-bar wrapper-none col-xs-12">
                        <div class="input-group pull-right clearfix">
                            <input type="text" class="form-control txt-search" placeholder="客户名称" ng-model="orderCondition.purchaseOrgName">
                            <span class="input-group-addon cursor-pointer" ng-click="orderSearch(1)">搜索</span>
                        </div>
                    </div>
                </div>
                <div class="main-area" style="top:170px;">
                    <div yb-table-fixed class="table-fixed-wrap">
                        <div class="th-scroll-x">
                            <table class="table-fixed border-none" width="{{sellTbConf.scrollWidth}}">
                                <thead>
                                <tr>
                                    <th width="80">
                                        操作
                                    </th>
                                    <th ng-repeat="itemCol in sellTbConf.tableCol track by $index" width="{{itemCol.width}}"
                                        ng-show="itemCol.type !== 'operate'">
                                        <div yb-thead-operate ng-model="itemCol" target-width="sellTbConf.scrollWidth"></div>
                                    </th>
                                </tr>
                                </thead>
                            </table>
                        </div>
                        <div class="td-scroll" ng-show="sellList.length > 0">
                            <table class="table-fixed border-none" width="{{sellTbConf.scrollWidth}}">
                                <tbody>
                                <tr ng-repeat="item in sellList track by $index">
                                    <td width="80">
                                        <button type="button" class="btn btn-operate" ng-click="selSell(item)">选择</button>
                                    </td>
                                    <td class="spill-dots" ng-repeat="itemCol in sellTbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}" ng-show="itemCol.type !== 'operate'">
                                        {{item[itemCol.dataField]}}
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="no-data w-full text-center p-t" ng-show="sellList.length === 0">暂时没有数据</div>
                    </div>
                </div>
                <div class="bottom-area page-bar wrapper-y-sm clearfix">
                    <div yb-page-info ng-model="sellPageInfo" yb-refresh="orderSearch()"></div>
                </div>
            </div>
            <div ng-show="steps.curStep === 1">
                <form name="form" class="p-t-sm p-b-sm form-horizontal form-up-tb border-t clearfix" novalidate>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">销售意向单号：</label>
                        <label class="col-xs-8 control-label p-l-n text-left spill-dots" title="{{detailInfo.saleNo}}">
                            {{detailInfo.saleNo}}
                        </label>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">采购公司：</label>
                        <label class="col-xs-8 control-label p-l-n text-left spill-dots" title="{{detailInfo.purchaseOrgName}}">
                            {{detailInfo.purchaseOrgName}}
                        </label>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">备件公司：</label>
                        <label class="col-xs-8 control-label p-l-n text-left spill-dots" title="{{detailInfo.supplierOrgName}}">
                            {{detailInfo.supplierOrgName}}
                        </label>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">销售员：</label>
                        <label class="col-xs-8 control-label p-l-n text-left spill-dots" title="{{detailInfo.salesmanName}}">
                            {{detailInfo.salesmanName}}
                        </label>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100"><i>*</i>付款条件：</label>
                        <div class="col-xs-8 wrapper-none">
                            <div dictionary-selector sel-code="detailInfo.payConditionCode" ng-model="detailInfo.payConditionName" sel-key="FKTJ">
                                <input type="text" name="payCondition" class="form-control light-bg" ng-model="detailInfo.payConditionName"
                                       placeholder="请选择" required readonly yb-focus>
                                <input type="hidden" name="payConditionCode" class="form-control light-bg" ng-model="detailInfo.payConditionCode">
                            </div>

                            <div class="msg-block" ng-if="form.payCondition.$dirty || (form.payCondition.$invalid && submitted)">
                                <div class="error-msg" ng-if="form.payCondition.$error.required && !form.payCondition.focused">
                                    <div class="msg-triangle"></div>
                                    必填项，请填写
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100"><i>*</i>订单原因：</label>
                        <div class="col-xs-8 wrapper-none">
                            <div dictionary-selector sel-code="detailInfo.returnReasonCode" ng-model="detailInfo.returnReasonName" sel-key="RETURN_REASON">
                                <input type="text" name="returnReasonName" class="form-control light-bg" ng-model="detailInfo.returnReasonName"
                                       placeholder="请选择" required readonly yb-focus>
                                <input type="hidden" name="returnReasonCode" class="form-control light-bg" ng-model="detailInfo.returnReasonCode">
                            </div>

                            <div class="msg-block" ng-if="form.returnReasonName.$dirty || (form.returnReasonName.$invalid && submitted)">
                                <div class="error-msg" ng-if="form.returnReasonName.$error.required && !form.returnReasonName.focused">
                                    <div class="msg-triangle"></div>
                                    必填项，请填写
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100"><i>*</i>退货类别：</label>
                        <div class="col-xs-8 wrapper-none">
                            <div dictionary-selector sel-code="detailInfo.returnCategoryCode" ng-model="detailInfo.returnCategoryName" sel-key="RETURN_CATEGORY">
                                <input type="text" name="returnCategoryName" class="form-control light-bg" ng-model="detailInfo.returnCategoryName"
                                       placeholder="请选择" required readonly yb-focus>
                                <input type="hidden" name="returnCategoryCode" class="form-control light-bg" ng-model="detailInfo.returnCategoryCode">
                            </div>

                            <div class="msg-block" ng-if="form.returnCategoryName.$dirty || (form.returnCategoryName.$invalid && submitted)">
                                <div class="error-msg" ng-if="form.returnCategoryName.$error.required && !form.returnCategoryName.focused">
                                    <div class="msg-triangle"></div>
                                    必填项，请填写
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group col-xs-3 m-b-sm">
                        <label class="col-xs-4 control-label max-w-100">备注：</label>
                        <div class="col-xs-8 wrapper-none">
                            <input type="text" name="remark" class="form-control" ng-model="detailInfo.remark"
                                   maxlength="100">
                        </div>
                    </div>
                </form>
                <div class="panel-bar clearfix">
                    <div class="pull-left">
                        <i></i>零件信息
                    </div>
                </div>
                <div class="main-area d-b-60" style="top:220px;">
                    <div yb-table-fixed class="table-fixed-wrap">
                        <div class="th-scroll-x">
                            <table class="table-fixed border-none" width="{{newTbConf.scrollWidth}}">
                                <thead>
                                <tr>
                                    <th ng-repeat="itemCol in newTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                        <div yb-thead-operate ng-model="itemCol" target-width="newTbConf.scrollWidth"></div>
                                    </th>
                                </tr>
                                </thead>
                            </table>
                        </div>
                        <div class="td-scroll" ng-show="detailInfo.returnApplyDetailVOs.length > 0">
                            <table class="table-fixed border-none" width="{{newTbConf.scrollWidth}}">
                                <tbody>
                                <tr ng-repeat="item in detailInfo.returnApplyDetailVOs track by $index">
                                    <td ng-repeat="itemCol in newTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                        <div class="spill-dots" ng-if="!itemCol.input" title="{{item[itemCol.dataField]}}">
                                            {{item[itemCol.dataField]}}
                                        </div>

                                        <div ng-if="itemCol.input && itemCol.inputType === 'num'" class="td-edit pos-r" title="{{item[itemCol.dataField]}}">
                                            <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                                   ng-change="checkQty(item, itemCol.dataField)" yb-number-input max="99999.999" maxlength="9"  disable-decimal="false" decimal-places="3"
                                                   ng-class="{'error': item.qtyErr}">
                                            <div class="pos-a tool-tips" ng-if="!!item.qtyErr">
                                                <i class="triangle"></i>
                                                <div class="msg">{{item.qtyErrMsg}}</div>
                                            </div>
                                        </div>

                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="no-data w-full text-center p-t" ng-show="detailInfo.returnApplyDetailVOs.length === 0">暂时没有数据</div>
                    </div>
                </div>
                <div class="bottom-area btn-bar text-center clearfix">
                    <button type="button" class="btn btn-primary m-r-sm" ng-click="prevStep()">上一步</button>
                    <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(form.$valid)">提交</button>
                    <button type="button" class="btn btn-default m-r-sm" ng-click="cancel()">取消</button>
                </div>
            </div>
        </div>
        <div tab heading="{{tabFlag.name}}" active="activeFlag[5]" ng-if="activeFlag[5]">
            <form name="form" class="m-t-sm form-horizontal form-up-tb border-b clearfix" novalidate>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>采购公司：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="purchaseOrgName" class="form-control light-bg" ng-model="detailInfo.purchaseOrgName"
                               ng-click="selectDealer()" required yb-focus readonly placeholder="请选择">

                        <div class="msg-block" ng-if="form.purchaseOrgName.$dirty || (form.purchaseOrgName.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.purchaseOrgName.$error.required && !form.purchaseOrgName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>采购人：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="buyerId" class="form-control" ng-model="detailInfo.buyerId"
                               required yb-focus maxlength="15">

                        <div class="msg-block" ng-if="form.buyerId.$dirty || (form.buyerId.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.buyerId.$error.required && !form.buyerId.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>付款条件：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div dictionary-selector sel-code="detailInfo.payConditionCode" ng-model="detailInfo.payConditionName" sel-key="FKTJ">
                            <input type="text" name="payCondition" class="form-control light-bg" ng-model="detailInfo.payConditionName"
                                   placeholder="请选择" required readonly yb-focus>
                            <input type="hidden" name="payConditionCode" class="form-control light-bg" ng-model="detailInfo.payConditionCode">
                        </div>

                        <div class="msg-block" ng-if="form.payCondition.$dirty || (form.payCondition.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.payCondition.$error.required && !form.payCondition.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>订单原因：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div dictionary-selector sel-code="detailInfo.returnReasonCode" ng-model="detailInfo.returnReasonName" sel-key="RETURN_REASON">
                            <input type="text" name="returnReasonName" class="form-control light-bg" ng-model="detailInfo.returnReasonName"
                                   placeholder="请选择" required readonly yb-focus>
                            <input type="hidden" name="returnReasonCode" class="form-control light-bg" ng-model="detailInfo.returnReasonCode">
                        </div>

                        <div class="msg-block" ng-if="form.returnReasonName.$dirty || (form.returnReasonName.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.returnReasonName.$error.required && !form.returnReasonName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>退货类别：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div dictionary-selector sel-code="detailInfo.returnCategoryCode" ng-model="detailInfo.returnCategoryName" sel-key="RETURN_CATEGORY">
                            <input type="text" name="returnCategoryName" class="form-control light-bg" ng-model="detailInfo.returnCategoryName"
                                   placeholder="请选择" required readonly yb-focus>
                            <input type="hidden" name="returnCategoryCode" class="form-control light-bg" ng-model="detailInfo.returnCategoryCode">
                        </div>

                        <div class="msg-block" ng-if="form.returnCategoryName.$dirty || (form.returnCategoryName.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.returnCategoryName.$error.required && !form.returnCategoryName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="remark" class="form-control" ng-model="detailInfo.remark"
                               maxlength="100">
                    </div>
                </div>
            </form>
            <div class="row wrapper-y-xs">
                <div class="col-xs-12 operate-bar font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="selMateriel($event)">选择零件</button>
                    <button class="btn btn-operate m-r-sm" ng-click="importMateriel()">导入零件</button>
                    <button class="btn btn-operate m-r-sm" ng-click="batchDelMateriel()">批量删除</button>
                    <button ng-show="detailInfo.returnApplyDetailVOs.length > 0" class="btn btn-operate m-r-sm" ng-click="batchChosePriceScheme()">批量选择价格方案</button>
                </div>
            </div>
            <div materiel-selector show-toolbar="toolbarConfig.showMateriel" selected-list="detailInfo.returnApplyDetailVOs"
                 is-purchase="true" dealer-id="detailInfo.purchaseOrgId" goal-type="sell" is-return-apply="true"></div>
            <div class="main-area d-b-60" style="top:160px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{manulTbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th width="40" class="th-check text-center">
                                    <div yb-check-box yb-checked="markInfo.allCheckedMaterial" yb-click="selectAllDetail(detailInfo.returnApplyDetailVOs, 'Material')"></div>
                                </th>
                                <th width="60">
                                    操作
                                </th>
                                <th ng-repeat="itemCol in manulTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="manulTbConf.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="detailInfo.returnApplyDetailVOs.length > 0">
                        <table class="table-fixed border-none" width="{{manulTbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in detailInfo.returnApplyDetailVOs track by $index">
                                <td width="40" class="text-center">
                                    <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item, detailInfo.returnApplyDetailVOs, 'Material')"></div>
                                </td>
                                <td width="60">
                                    <button type="button" class="btn btn-operate" ng-click="delMateriel(item, $index)">删除</button>
                                </td>
                                <td ng-repeat="itemCol in manulTbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-class="{'wrapper-none': itemCol.inputType === 'func'}">
                                    <div class="spill-dots" ng-if="!itemCol.input" title="{{item[itemCol.dataField]}}">
                                        {{item[itemCol.dataField]}}
                                    </div>

                                    <div yb-form-clear class="td-edit" ng-model="item[itemCol.dataField]" select-obj="chosePriceScheme(item, $parent.$parent.$index)"
                                         clear-form="clearPriceScheme(item)" tips-name="价格方案" ng-if="!!itemCol.input && itemCol.inputType === 'func'"
                                         title="{{item[itemCol.dataField]}}"></div>

                                    <div ng-if="itemCol.input && itemCol.inputType === 'price'" class="td-edit pos-r"
                                         title="{{item[itemCol.dataField]}}">
                                        <input type="text" class="form-control edit" ng-model="item[itemCol.dataField]"
                                               ng-change="setAdjustPrice(item, itemCol.dataField)"
                                               yb-number-input disable-decimal="false" decimal-places="2" max="99999999.99"
                                               ng-class="{'error': item.priceAdjustErr}">
                                        <div class="pos-a tool-tips" ng-if="!!item.priceAdjustErr">
                                            <i class="triangle"></i>
                                            <div class="msg">单价不能为空和0</div>
                                        </div>
                                    </div>

                                    <div ng-if="itemCol.input && itemCol.inputType === 'num'" class="td-edit pos-r" title="{{item[itemCol.dataField]}}">
                                        <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                               ng-change="checkQty(item, itemCol.dataField)" yb-number-input max="99999.999" maxlength="9"  disable-decimal="false" decimal-places="3"
                                               ng-class="{'error': item.qtyErr}">
                                        <div class="pos-a tool-tips" ng-if="!!item.qtyErr">
                                            <i class="triangle"></i>
                                            <div class="msg">{{item.qtyErrMsg}}</div>
                                        </div>
                                    </div>

                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="detailInfo.returnApplyDetailVOs.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary m-r-sm" ng-click="manulSaveData(form.$valid)">提交</button>
                <button type="button" class="btn btn-default m-r-sm" ng-click="cancel()">取消</button>
            </div>
        </div>
        <div tab heading="编辑" active="activeFlag[4]" ng-if="activeFlag[4]">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.applyNo || '-'}}">
                        {{detailInfo.applyNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">销售意向单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.saleNo || '-'}}">
                        {{detailInfo.saleNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购公司：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.purchaseOrgName) || '-'}}">
                        {{detailInfo.purchaseOrgName || "-"}}
                    </div>
                </div>
                <!--<div class="form-group col-xs-3 m-b-sm">-->
                <!--<label class="col-xs-4 m-b-n text-right max-w-100">采购员：</label>-->
                <!--<div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.buyerName || '-'}}">-->
                <!--{{detailInfo.buyerName || "-"}}-->
                <!--</div>-->
                <!--</div>-->
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备件公司：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.supplierOrgName) || '-'}}">
                        {{(detailInfo.supplierOrgName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">销售员：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.salesmanName}}">
                        {{detailInfo.salesmanName}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots">
                        {{(detailInfo.createDate|YbDate:"yyyy-MM-dd HH:mm:ss") || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">退货状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.isReturnDesc) || '-'}}">
                        {{(detailInfo.isReturnDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.statusDesc) || '-'}}">
                        {{(detailInfo.statusDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第一步审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.auditName || '-'}}">
                        {{detailInfo.auditName || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第一步审核时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.auditDate|YbDate) || '-'}}">
                        {{(detailInfo.auditDate|YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第二步审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.secondAuditName || '-'}}">
                        {{detailInfo.secondAuditName || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第二步审核时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.secondAuditDate|YbDate) || '-'}}">
                        {{(detailInfo.secondAuditDate|YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核意见：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.auditDesc) || '-'}}">
                        {{(detailInfo.auditDesc) || "-"}}
                    </div>
                </div>
            </div>
            <form name="form" class="m-t-sm form-horizontal form-up-tb clearfix" novalidate>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>付款条件：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div dictionary-selector sel-code="detailInfo.payConditionCode" ng-model="detailInfo.payConditionName" sel-key="FKTJ">
                            <input type="text" name="payCondition" class="form-control light-bg" ng-model="detailInfo.payConditionName"
                                   placeholder="请选择" required readonly yb-focus>
                            <input type="hidden" name="payConditionCode" class="form-control light-bg" ng-model="detailInfo.payConditionCode">
                        </div>

                        <div class="msg-block" ng-if="form.payCondition.$dirty || (form.payCondition.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.payCondition.$error.required && !form.payCondition.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>订单原因：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div dictionary-selector sel-code="detailInfo.returnReasonCode" ng-model="detailInfo.returnReasonName" sel-key="RETURN_REASON">
                            <input type="text" name="returnReasonName" class="form-control light-bg" ng-model="detailInfo.returnReasonName"
                                   placeholder="请选择" required readonly yb-focus>
                            <input type="hidden" name="returnReasonCode" class="form-control light-bg" ng-model="detailInfo.returnReasonCode">
                        </div>

                        <div class="msg-block" ng-if="form.returnReasonName.$dirty || (form.returnReasonName.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.returnReasonName.$error.required && !form.returnReasonName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>退货类别：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div dictionary-selector sel-code="detailInfo.returnCategoryCode" ng-model="detailInfo.returnCategoryName" sel-key="RETURN_CATEGORY">
                            <input type="text" name="returnCategoryName" class="form-control light-bg" ng-model="detailInfo.returnCategoryName"
                                   placeholder="请选择" required readonly yb-focus>
                            <input type="hidden" name="returnCategoryCode" class="form-control light-bg" ng-model="detailInfo.returnCategoryCode">
                        </div>

                        <div class="msg-block" ng-if="form.returnCategoryName.$dirty || (form.returnCategoryName.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.returnCategoryName.$error.required && !form.returnCategoryName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="remark" class="form-control" ng-model="detailInfo.remark"
                               maxlength="100">
                    </div>
                </div>
            </form>
            <div class="panel-bar clearfix">
                <div class="pull-left">
                    <i></i>零件信息
                </div>
            </div>
            <div class="main-area d-b-60" style="top:240px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{editTbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in editTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="editTbConf.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="detailInfo.returnApplyDetailVOs.length > 0">
                        <table class="table-fixed border-none" width="{{editTbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in detailInfo.returnApplyDetailVOs track by $index">
                                <td ng-repeat="itemCol in editTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                    <div class="spill-dots" ng-if="!itemCol.input" title="{{item[itemCol.dataField]}}">
                                        {{item[itemCol.dataField]}}
                                    </div>

                                    <div ng-if="itemCol.input && itemCol.inputType === 'num'" class="td-edit pos-r" title="{{item[itemCol.dataField]}}">
                                        <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                               ng-change="checkQty(item, itemCol.dataField)" yb-number-input max="99999.999" maxlength="9"  disable-decimal="false" decimal-places="3"
                                               ng-class="{'error': item.qtyErr}">
                                        <div class="pos-a tool-tips" ng-if="!!item.qtyErr">
                                            <i class="triangle"></i>
                                            <div class="msg">{{item.qtyErrMsg}}</div>
                                        </div>
                                    </div>

                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="detailInfo.returnApplyDetailVOs.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(true)">提交</button>
                <button type="button" class="btn btn-default m-r-sm" ng-click="cancel()">取消</button>
            </div>
        </div>
        <div tab heading="编辑" active="activeFlag[7]" ng-if="activeFlag[7]">
            <form name="form" class="m-t-sm form-horizontal form-up-tb clearfix" novalidate>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>采购公司：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="purchaseOrgName" class="form-control light-bg" ng-model="detailInfo.purchaseOrgName"
                               ng-click="selectDealer()" required yb-focus readonly placeholder="请选择">

                        <div class="msg-block" ng-if="form.purchaseOrgName.$dirty || (form.purchaseOrgName.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.purchaseOrgName.$error.required && !form.purchaseOrgName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>采购人：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="buyerId" class="form-control" ng-model="detailInfo.buyerId"
                               required yb-focus maxlength="20">

                        <div class="msg-block" ng-if="form.buyerId.$dirty || (form.buyerId.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.buyerId.$error.required && !form.buyerId.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>付款条件：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div dictionary-selector sel-code="detailInfo.payConditionCode" ng-model="detailInfo.payConditionName" sel-key="FKTJ">
                            <input type="text" name="payCondition" class="form-control light-bg" ng-model="detailInfo.payConditionName"
                                   placeholder="请选择" required readonly yb-focus>
                            <input type="hidden" name="payConditionCode" class="form-control light-bg" ng-model="detailInfo.payConditionCode">
                        </div>

                        <div class="msg-block" ng-if="form.payCondition.$dirty || (form.payCondition.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.payCondition.$error.required && !form.payCondition.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>订单原因：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div dictionary-selector sel-code="detailInfo.returnReasonCode" ng-model="detailInfo.returnReasonName" sel-key="RETURN_REASON">
                            <input type="text" name="returnReasonName" class="form-control light-bg" ng-model="detailInfo.returnReasonName"
                                   placeholder="请选择" required readonly yb-focus>
                            <input type="hidden" name="returnReasonCode" class="form-control light-bg" ng-model="detailInfo.returnReasonCode">
                        </div>

                        <div class="msg-block" ng-if="form.returnReasonName.$dirty || (form.returnReasonName.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.returnReasonName.$error.required && !form.returnReasonName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i>退货类别：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div dictionary-selector sel-code="detailInfo.returnCategoryCode" ng-model="detailInfo.returnCategoryName" sel-key="RETURN_CATEGORY">
                            <input type="text" name="returnCategoryName" class="form-control light-bg" ng-model="detailInfo.returnCategoryName"
                                   placeholder="请选择" required readonly yb-focus>
                            <input type="hidden" name="returnCategoryCode" class="form-control light-bg" ng-model="detailInfo.returnCategoryCode">
                        </div>

                        <div class="msg-block" ng-if="form.returnCategoryName.$dirty || (form.returnCategoryName.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.returnCategoryName.$error.required && !form.returnCategoryName.focused">
                                <div class="msg-triangle"></div>
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="remark" class="form-control" ng-model="detailInfo.remark"
                               maxlength="100">
                    </div>
                </div>
            </form>
            <div class="m-t-sm form-up-tb border-b clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.statusDesc) || '-'}}">
                        {{(detailInfo.statusDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第一步审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.auditName || '-'}}">
                        {{detailInfo.auditName || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第一步审核时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.auditDate|YbDate) || '-'}}">
                        {{(detailInfo.auditDate|YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第二步审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.secondAuditName || '-'}}">
                        {{detailInfo.secondAuditName || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第二步审核时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.secondAuditDate|YbDate) || '-'}}">
                        {{(detailInfo.secondAuditDate|YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核意见：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.auditDesc) || '-'}}">
                        {{(detailInfo.auditDesc) || "-"}}
                    </div>
                </div>
            </div>
            <div class="row wrapper-y-xs">
                <div class="col-xs-12 operate-bar font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="selMateriel($event)">选择零件</button>
                    <button class="btn btn-operate m-r-sm" ng-click="importMateriel()">导入零件</button>
                    <button class="btn btn-operate m-r-sm" ng-click="batchDelMateriel()">批量删除</button>
                    <button ng-show="detailInfo.returnApplyDetailVOs.length > 0" class="btn btn-operate m-r-sm" ng-click="batchChosePriceScheme()">批量选择价格方案</button>
                </div>
            </div>
            <div materiel-selector show-toolbar="toolbarConfig.showMateriel" selected-list="detailInfo.returnApplyDetailVOs"
                 is-purchase="true" dealer-id="detailInfo.purchaseOrgId" goal-type="sell" is-return-apply="true"></div>
            <div class="main-area d-b-60" style="top:230px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{manulEditTbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th width="40" class="th-check text-center">
                                    <div yb-check-box yb-checked="markInfo.allCheckedMaterial" yb-click="selectAllDetail(detailInfo.returnApplyDetailVOs, 'Material')"></div>
                                </th>
                                <th width="60">
                                    操作
                                </th>
                                <th ng-repeat="itemCol in manulEditTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="manulTbConf.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="detailInfo.returnApplyDetailVOs.length > 0">
                        <table class="table-fixed border-none" width="{{manulEditTbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in detailInfo.returnApplyDetailVOs track by $index">
                                <td width="40" class="text-center">
                                    <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item, detailInfo.returnApplyDetailVOs, 'Material')"></div>
                                </td>
                                <td width="60">
                                    <button type="button" class="btn btn-operate" ng-click="delMateriel(item, $index)">删除</button>
                                </td>
                                <td ng-repeat="itemCol in manulEditTbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-class="{'wrapper-none': itemCol.inputType === 'func'}">
                                    <div class="spill-dots" ng-if="!itemCol.input" title="{{item[itemCol.dataField]}}">
                                        {{item[itemCol.dataField]}}
                                    </div>

                                    <div yb-form-clear class="td-edit" ng-model="item[itemCol.dataField]" select-obj="chosePriceScheme(item, $parent.$parent.$index)"
                                         clear-form="clearPriceScheme(item)" tips-name="价格方案" ng-if="!!itemCol.input && itemCol.inputType === 'func'"
                                         title="{{item[itemCol.dataField]}}"></div>

                                    <div ng-if="itemCol.input && itemCol.inputType === 'price'" class="td-edit pos-r"
                                         title="{{item[itemCol.dataField]}}">
                                        <input type="text" class="form-control edit" ng-model="item[itemCol.dataField]"
                                               ng-change="setAdjustPrice(item, itemCol.dataField)"
                                               yb-number-input disable-decimal="false" decimal-places="2" max="99999999.99"
                                               ng-class="{'error': item.priceAdjustErr}">
                                        <div class="pos-a tool-tips" ng-if="!!item.priceAdjustErr">
                                            <i class="triangle"></i>
                                            <div class="msg">单价不能为空和0</div>
                                        </div>
                                    </div>

                                    <div ng-if="itemCol.input && itemCol.inputType === 'num'" class="td-edit pos-r" title="{{item[itemCol.dataField]}}">
                                        <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                               ng-change="checkQty(item, itemCol.dataField)" yb-number-input max="99999.999" maxlength="9"  disable-decimal="false" decimal-places="3"
                                               ng-class="{'error': item['qtyErr'+itemCol.dataField]}">
                                        <div class="pos-a tool-tips" ng-if="!!item['qtyErr'+itemCol.dataField]">
                                            <i class="triangle"></i>
                                            <div class="msg">{{item['qtyErrMsg'+itemCol.dataField]}}</div>
                                        </div>
                                    </div>

                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="detailInfo.returnApplyDetailVOs.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary m-r-sm" ng-click="manulSaveData(true)">提交</button>
                <button type="button" class="btn btn-default m-r-sm" ng-click="cancel()">取消</button>
            </div>
        </div>
        <div tab heading="详情" active="activeFlag[3]" ng-if="activeFlag[3]">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.applyNo || '-'}}">
                        {{detailInfo.applyNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">销售意向单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.saleNo || '-'}}">
                        {{detailInfo.saleNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购公司：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.purchaseOrgName) || '-'}}">
                        {{detailInfo.purchaseOrgName || "-"}}
                    </div>
                </div>
                <!--<div class="form-group col-xs-3 m-b-sm">-->
                    <!--<label class="col-xs-4 m-b-n text-right max-w-100">采购员：</label>-->
                    <!--<div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.buyerName || '-'}}">-->
                        <!--{{detailInfo.buyerName || "-"}}-->
                    <!--</div>-->
                <!--</div>-->
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备件公司：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.supplierOrgName) || '-'}}">
                        {{(detailInfo.supplierOrgName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">销售员：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.salesmanName}}">
                        {{detailInfo.salesmanName}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots">
                        {{(detailInfo.createDate|YbDate:"yyyy-MM-dd HH:mm:ss") || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">退货状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.isReturnDesc) || '-'}}">
                        {{(detailInfo.isReturnDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">付款条件：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.payConditionName) || '-'}}">
                        {{(detailInfo.payConditionName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">订单原因：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.returnReasonName) || '-'}}">
                        {{(detailInfo.returnReasonName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">退货类别：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.returnCategoryName) || '-'}}">
                        {{(detailInfo.returnCategoryName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.statusDesc) || '-'}}">
                        {{(detailInfo.statusDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第一步审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.auditName || '-'}}">
                        {{detailInfo.auditName || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第一步审核时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.auditDate|YbDate) || '-'}}">
                        {{(detailInfo.auditDate|YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第二步审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.secondAuditName || '-'}}">
                        {{detailInfo.secondAuditName || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第二步审核时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.secondAuditDate|YbDate) || '-'}}">
                        {{(detailInfo.secondAuditDate|YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核意见：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.auditDesc) || '-'}}">
                        {{(detailInfo.auditDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.remark) || '-'}}">
                        {{detailInfo.remark || "-"}}
                    </div>
                </div>
            </div>
            <div class="panel-bar clearfix">
                <div class="pull-left">
                    <i></i>零件信息
                </div>
            </div>
            <div class="main-area d-b-60" style="top:230px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{viewTbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in viewTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="editMaterielConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="detailInfo.returnApplyDetailVOs.length > 0">
                        <table class="table-fixed border-none" width="{{viewTbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in detailInfo.returnApplyDetailVOs track by $index">
                                <td class="spill-dots" ng-repeat="itemCol in viewTbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                    {{item[itemCol.dataField]}}
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="detailInfo.returnApplyDetailVOs.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-default" ng-click="cancel()">返回</button>
            </div>
        </div>
        <div tab heading="审核" active="activeFlag[2]" ng-if="activeFlag[2]">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.applyNo || '-'}}">
                        {{detailInfo.applyNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">销售意向单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.saleNo || '-'}}">
                        {{detailInfo.saleNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购公司：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.purchaseOrgName) || '-'}}">
                        {{detailInfo.purchaseOrgName || "-"}}
                    </div>
                </div>
                <!--<div class="form-group col-xs-3 m-b-sm">-->
                    <!--<label class="col-xs-4 m-b-n text-right max-w-100">采购员：</label>-->
                    <!--<div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.buyerName || '-'}}">-->
                        <!--{{detailInfo.buyerName || "-"}}-->
                    <!--</div>-->
                <!--</div>-->
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备件公司：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.supplierOrgName) || '-'}}">
                        {{(detailInfo.supplierOrgName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">销售员：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.salesmanName}}">
                        {{detailInfo.salesmanName}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots">
                        {{(detailInfo.createDate|YbDate:"yyyy-MM-dd HH:mm:ss") || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">退货状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.isReturnDesc) || '-'}}">
                        {{(detailInfo.isReturnDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">付款条件：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.payConditionName) || '-'}}">
                        {{(detailInfo.payConditionName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">订单原因：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.returnReasonName) || '-'}}">
                        {{(detailInfo.returnReasonName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">退货类别：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.returnCategoryName) || '-'}}">
                        {{(detailInfo.returnCategoryName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.statusDesc) || '-'}}">
                        {{(detailInfo.statusDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第一步审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.auditName || '-'}}">
                        {{detailInfo.auditName || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第一步审核时间
                        ：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.auditDate|YbDate) || '-'}}">
                        {{(detailInfo.auditDate|YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第二步审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.secondAuditName || '-'}}">
                        {{detailInfo.secondAuditName || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第二步审核时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.secondAuditDate|YbDate) || '-'}}">
                        {{(detailInfo.secondAuditDate|YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核意见：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.auditDesc) || '-'}}">
                        {{(detailInfo.auditDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.remark) || '-'}}">
                        {{detailInfo.remark || "-"}}
                    </div>
                </div>
            </div>
            <div class="panel-bar pos-a clearfix" style="left:0;right: 240px;">
                <div class="pull-left">
                    <i></i>零件信息
                </div>
            </div>
            <div class="panel-bar pos-a clearfix" style="right: 0; width: 225px;">
                <div class="pull-left">
                    <i></i>审核意见
                </div>
            </div>
            <div class="main-area d-b-60" style="top:230px; right: 240px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{auditTbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in auditTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="editMaterielConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="detailInfo.returnApplyDetailVOs.length > 0">
                        <table class="table-fixed border-none" width="{{auditTbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in detailInfo.returnApplyDetailVOs track by $index">
                                <td class="spill-dots" ng-repeat="itemCol in auditTbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                    <div class="spill-dots" ng-if="!itemCol.input" title="{{item[itemCol.dataField]}}">
                                        {{item[itemCol.dataField]}}
                                    </div>

                                    <div ng-if="itemCol.input && itemCol.inputType === 'num'" class="td-edit pos-r" title="{{item[itemCol.dataField]}}">
                                        <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                               ng-change="checkQty(item, itemCol.dataField)" yb-number-input max="99999.999" maxlength="9"  disable-decimal="false" decimal-places="3"
                                               ng-class="{'error': item.qtyErr}">
                                        <div class="pos-a tool-tips" ng-if="!!item.qtyErr">
                                            <i class="triangle"></i>
                                            <div class="msg">{{item.qtyErrMsg}}</div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="detailInfo.returnApplyDetailVOs.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="main-area d-b-60" style="top:230px; left: auto; width: 225px;">
                <div class="main-wrap p-b-lg over-flow-h">
                    <textarea yb-word-count max-size="100" name="auditDesc" class="form-control full" ng-model="detailInfo.auditDesc"
                              ng-class="{'error': !detailInfo.auditDesc && submitted}" placeholder="审核意见"></textarea>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary m-r-sm" ng-click="auditPurchase('pass', detailInfo)">通过</button>
                <button type="button" class="btn btn-primary m-r-sm" ng-click="auditPurchase('refuse', detailInfo)">拒绝</button>
                <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
            </div>
        </div>
        <div tab heading="详情" active="activeFlag[6]" ng-if="activeFlag[6]">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.applyNo || '-'}}">
                        {{detailInfo.applyNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购公司：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.purchaseOrgName) || '-'}}">
                        {{detailInfo.purchaseOrgName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                <label class="col-xs-4 m-b-n text-right max-w-100">采购员：</label>
                <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.buyerId || '-'}}">
                {{detailInfo.buyerId || "-"}}
                </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备件公司：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.supplierOrgName) || '-'}}">
                        {{(detailInfo.supplierOrgName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots">
                        {{(detailInfo.createDate|YbDate:"yyyy-MM-dd HH:mm:ss") || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">退货状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.isReturnDesc) || '-'}}">
                        {{(detailInfo.isReturnDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">付款条件：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.payConditionName) || '-'}}">
                        {{(detailInfo.payConditionName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">订单原因：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.returnReasonName) || '-'}}">
                        {{(detailInfo.returnReasonName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">退货类别：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.returnCategoryName) || '-'}}">
                        {{(detailInfo.returnCategoryName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.statusDesc) || '-'}}">
                        {{(detailInfo.statusDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第一步审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.auditName || '-'}}">
                        {{detailInfo.auditName || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第一步审核时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.auditDate|YbDate) || '-'}}">
                        {{(detailInfo.auditDate|YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第二步审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.secondAuditName || '-'}}">
                        {{detailInfo.secondAuditName || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第二步审核时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.secondAuditDate|YbDate) || '-'}}">
                        {{(detailInfo.secondAuditDate|YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核意见：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.auditDesc) || '-'}}">
                        {{(detailInfo.auditDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.remark) || '-'}}">
                        {{detailInfo.remark || "-"}}
                    </div>
                </div>
            </div>
            <div class="panel-bar clearfix">
                <div class="pull-left">
                    <i></i>零件信息
                </div>
            </div>
            <div class="main-area d-b-60" style="top:190px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{manulViewTbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in manulViewTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="editMaterielConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="detailInfo.returnApplyDetailVOs.length > 0">
                        <table class="table-fixed border-none" width="{{manulViewTbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in detailInfo.returnApplyDetailVOs track by $index">
                                <td class="spill-dots" ng-repeat="itemCol in manulViewTbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                    {{item[itemCol.dataField]}}
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="detailInfo.returnApplyDetailVOs.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-default" ng-click="cancel()">返回</button>
            </div>
        </div>
        <div tab heading="审核" active="activeFlag[8]" ng-if="activeFlag[8]">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.applyNo || '-'}}">
                        {{detailInfo.applyNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购公司：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.purchaseOrgName) || '-'}}">
                        {{detailInfo.purchaseOrgName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购员：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.buyerId || '-'}}">
                        {{detailInfo.buyerId || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备件公司：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.supplierOrgName) || '-'}}">
                        {{(detailInfo.supplierOrgName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">申请时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots">
                        {{(detailInfo.createDate|YbDate:"yyyy-MM-dd HH:mm:ss") || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">退货状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.isReturnDesc) || '-'}}">
                        {{(detailInfo.isReturnDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">付款条件：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.payConditionName) || '-'}}">
                        {{(detailInfo.payConditionName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">订单原因：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.returnReasonName) || '-'}}">
                        {{(detailInfo.returnReasonName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">退货类别：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.returnCategoryName) || '-'}}">
                        {{(detailInfo.returnCategoryName) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.statusDesc) || '-'}}">
                        {{(detailInfo.statusDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第一步审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.auditName || '-'}}">
                        {{detailInfo.auditName || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第一步审核时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.auditDate|YbDate) || '-'}}">
                        {{(detailInfo.auditDate|YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第二步审核人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{detailInfo.secondAuditName || '-'}}">
                        {{detailInfo.secondAuditName || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">第二步审核时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.secondAuditDate|YbDate) || '-'}}">
                        {{(detailInfo.secondAuditDate|YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">审核意见：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.auditDesc) || '-'}}">
                        {{(detailInfo.auditDesc) || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(detailInfo.remark) || '-'}}">
                        {{detailInfo.remark || "-"}}
                    </div>
                </div>
            </div>
            <div class="panel-bar pos-a clearfix" style="left:0;right: 240px;">
                <div class="pull-left">
                    <i></i>零件信息
                </div>
            </div>
            <div class="panel-bar pos-a clearfix" style="right: 0; width: 225px;">
                <div class="pull-left">
                    <i></i>审核意见
                </div>
            </div>
            <div class="main-area d-b-60" style="top:200px; right: 240px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{manulAuditTbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in manulAuditTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="editMaterielConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="detailInfo.returnApplyDetailVOs.length > 0">
                        <table class="table-fixed border-none" width="{{manulAuditTbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in detailInfo.returnApplyDetailVOs track by $index">
                                <td class="spill-dots" ng-repeat="itemCol in manulAuditTbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                    <div class="spill-dots" ng-if="!itemCol.input" title="{{item[itemCol.dataField]}}">
                                        {{item[itemCol.dataField]}}
                                    </div>

                                    <div ng-if="itemCol.input && itemCol.inputType === 'num'" class="td-edit pos-r" title="{{item[itemCol.dataField]}}">
                                        <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                               ng-change="checkQty(item, itemCol.dataField)" yb-number-input max="99999.999" maxlength="9"  disable-decimal="false" decimal-places="3"
                                               ng-class="{'error': item.qtyErr}">
                                        <div class="pos-a tool-tips" ng-if="!!item.qtyErr">
                                            <i class="triangle"></i>
                                            <div class="msg">{{item.qtyErrMsg}}</div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="detailInfo.returnApplyDetailVOs.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="main-area d-b-60" style="top:200px; left: auto; width: 225px;">
                <div class="main-wrap p-b-lg over-flow-h">
                    <textarea yb-word-count max-size="100" name="auditDesc" class="form-control full" ng-model="detailInfo.auditDesc"
                              ng-class="{'error': !detailInfo.auditDesc && submitted}" placeholder="审核意见"></textarea>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary m-r-sm" ng-click="auditPurchase('pass', detailInfo)">通过</button>
                <button type="button" class="btn btn-primary m-r-sm" ng-click="auditPurchase('refuse', detailInfo)">拒绝</button>
                <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
            </div>
        </div>
    </div>
</div>